package com.example.driving.utils;

import com.example.driving.Retrofit2.CustomGsonConverterFactory;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import retrofit2.Retrofit;

public class NetUtils {
    public static final String BASE_URL = "http://192.168.43.79:8080";

    public static Api get(){

        Gson gson = new GsonBuilder()
                .setLenient()
                .create();


        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(BASE_URL)
//                .addCallAdapterFactory(LiveDataCallAdapterFactory.create())
                .addConverterFactory(CustomGsonConverterFactory.create(gson))
//                .addConverterFactory(GsonConverterFactory.create())
                .build();

        return retrofit.create(Api.class);
    }




    
}
